import { graphql } from 'graphql'
import data from './graphqlData.js' //测试数据-实际不需要 为后台接口返回
// 数据初始化
const init = () => {
  let query = `{
      hello(name:"test"),
      person(name:"test"){
        name,
        sex,
        age
      }
    }`
  graphql(data, query).then((res) => {
    app.$emit(app.EventType.dataInit, { data: res, force: true })
  })
  app.log('graphql init')
}

export { init }
